home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / newsgroups / misc.20000217-20000824 / 000406_news@columbia.edu _Fri Jul 14 00:10:35 2000.msg < prev    next >
Internet Message Format  |  2020-01-01  |  3KB

  1. Return-Path: <news@columbia.edu>
  2. Received: from watsun.cc.columbia.edu (watsun.cc.columbia.edu [128.59.39.2])
  3.     by monire.cc.columbia.edu (8.9.3/8.9.3) with ESMTP id AAA16315
  4.     for <kermit.misc@cpunix.cc.columbia.edu>; Fri, 14 Jul 2000 00:10:34 -0400 (EDT)
  5. Received: from newsmaster.cc.columbia.edu (newsmaster.cc.columbia.edu [128.59.59.30])
  6.     by watsun.cc.columbia.edu (8.8.5/8.8.5) with ESMTP id AAA01194
  7.     for <kermit.misc@watsun.cc.columbia.edu>; Fri, 14 Jul 2000 00:10:34 -0400 (EDT)
  8. Received: (from news@localhost)
  9.     by newsmaster.cc.columbia.edu (8.9.3/8.9.3) id AAA07435
  10.     for kermit.misc@watsun.cc.columbia.edu; Fri, 14 Jul 2000 00:07:01 -0400 (EDT)
  11. X-Authentication-Warning: newsmaster.cc.columbia.edu: news set sender to <news> using -f
  12. From: Mark Sapiro <msapiro@value.net>
  13. Subject: Suggestion for Kermit script language
  14. Date: Thu, 13 Jul 2000 20:59:49 -0700
  15. Organization: Not Very Much
  16. Message-ID: <396E9035.C028E5FE@value.net>
  17. To: kermit.misc@columbia.edu
  18.  
  19. Often in a macro or script one wishes to save the current settings of
  20. certain parameters before changing them so that they can be restored
  21. later.  When the setting is reflected in a variable, this can be done,
  22. but it is a bit awkward.  Some settings are not reflected in variables,
  23. and saving a prior setting can't be done.
  24.  
  25. Consider the following macro which I actually use to connect to a
  26. library cataloging and circulation system in Marin County, Calif.
  27.  
  28. marinlib = local termtyp,-
  29.  assign termtyp \v(terminal),-
  30.  set terminal type vt100,-
  31.  set telopt kermit refused refused,-
  32.  telnet marinet.lib.ca.us,-
  33.  set terminal type \m(termtyp),-
  34.  set telopt kermit requested requested
  35.  
  36. (the "set telopt kermit refused refused" is required because the server
  37. responds to "WILL kermit" and "DO kermit" with "WONT UNKNOWN" and "DONT
  38. UNKNOWN" and things deterioriate from there.)
  39.  
  40. Note that I am only guessing that "set telopt kermit requested
  41. requested" the proper state to restore to.
  42.  
  43. I would like to see "save" and "restore" options added to the set
  44. command to save the current state of the affected parameter on a stack
  45. for that parameter and restore the parameter from its stack
  46. respectively.  Restoring from an empty stack would restore the default
  47. value for that parameter.
  48.  
  49. With this feature, the above macro could become:
  50.  
  51. Marinlib = set /save terminal type vt100,-
  52.  set /save telopt kermit refused refused,-
  53.  telnet marinet.lib.ca.us,-
  54.  set /restore terminal type,-
  55.  set /restore telopt kermit
  56.  
  57. The above syntax is for example only.  Any syntax that works would be
  58. acceptable.
  59. -- 
  60. Mark Sapiro <msapiro@value.net>       The highway is for gamblers,
  61. San Francisco Bay Area, California    better use your sense - B. Dylan